package com.retail.order.controller;

import com.retail.common.core.domain.Result;
import com.retail.order.domain.Address;
import com.retail.order.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/address")
public class AddressController {
    @Autowired
    AddressService addressService;

    @GetMapping("list")
    public Result list(){
        return Result.success(addressService.list());
    }

//    @GetMapping("/list/tree")
//    public Result listTree(Address address){
//        List<Address> list = addressService.listTree(address);
//        return Result.success(list);
//    }
}
